package Kolekcje;

import java.util.ArrayList;

class Gerbil{
	int gerbilNumber;
	public Gerbil(int g){
		this.gerbilNumber=g;
	}
	public int hop(){
		return gerbilNumber;
	}
}
public class GerbilTest {
	public static void main(String[] args){
		ArrayList gerbilLists=new ArrayList();
		gerbilLists.add(new Gerbil(10));
		gerbilLists.add(new Gerbil(5));
		gerbilLists.add(new Gerbil(15));
		for (int i=0; i<gerbilLists.size(); i++){
			System.out.println(((Gerbil) gerbilLists.get(i)).hop());
		}
	}

}
